from django.db import models

class Videos(models.Model):
    id           = models.AutoField(primary_key  = True)
    tid          = models.PositiveIntegerField()
    title        = models.CharField(max_length   = 50)
    type         = models.CharField(max_length   = 50)
    pic          = models.URLField(max_length    = 255)
    actor        = models.CharField(max_length   = 255)
    director     = models.CharField(max_length   = 255)
    description  = models.TextField()
    play_url     = models.TextField()
    reurl        = models.URLField(max_length    = 255, unique= True)
    datetime     = models.DateTimeField()
    class Meta:
        db_table = 'videos'

class Category(models.Model):
    id       = models.AutoField(primary_key=True)
    title    = models.CharField(max_length=50, unique=True)
    class Meta:
        db_table = 'category'
